#ifndef D_ADDITEM_H
#define D_ADDITEM_H

#include <head/g_pch.h>
#include <head/m_message.h>
#include "m_fhs.h"

namespace Ui {
class D_AddItem;
}

class D_AddItem : public QDialog
{
    Q_OBJECT

public:
    explicit D_AddItem(QWidget *parent = nullptr);
    ~D_AddItem();

    void setItem(int id,
                 const QString &label,
                 const QString &detail);
signals:
    void addItem(const QJsonObject &obj);
    void updateItem(const QJsonObject &obj);

private slots:
    void on_btn_submit_clicked();

private:
    Ui::D_AddItem *ui;

    int _id;
    QString _label,_detail;
};

#endif // D_ADDITEM_H
